package com.bootdo.lvyou_specialty.dao;

import com.bootdo.lvyou_specialty.domain.LvyouSpecialtyUserAddress;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * 
 * @author haojiangbo
 * @email 2100272728@qq.com
 * @date 2019-10-14 15:34:54
 */
@Mapper
public interface LvyouSpecialtyUserAddressDao {

	LvyouSpecialtyUserAddress get(Long id);
	
	List<LvyouSpecialtyUserAddress> list(Map<String,Object> map);
	
	int count(Map<String,Object> map);
	
	int save(LvyouSpecialtyUserAddress lvyouSpecialtyUserAddress);
	
	int update(LvyouSpecialtyUserAddress lvyouSpecialtyUserAddress);
	
	int remove(Long id);
	
	int batchRemove(Long[] ids);

	@Select("SELECT * from me_lvyou_specialty_user_address where uid = #{uid} and is_default = 1")
	List<LvyouSpecialtyUserAddress> getByUid(@Param("uid") Long uid);
}
